package com.dl.dlcommon.interceptor.exception.impl;

import com.dl.dlcommon.exception.LoginException;
import com.dl.dlcommon.interceptor.exception.ExceptionHandlerStrategy;
import com.dl.dlcommon.utils.result.Result;

/**
 * 登录异常处理
 * @author DL
 * @create 2024-04-08 9:48
 */
public class LoginExceptionHandler implements ExceptionHandlerStrategy {

    @Override
    public Result handleException(Exception e) {

        LoginException loginException = (LoginException) e;
        return Result.error(loginException.getErrorMessage());
    }
}
